using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _5_22
{
    internal class M
    {
        public int S(int a,int b)
        {
            return a * b;
        }
        public int S(double r)
        {
            double s = Math.PI*r*r;
            return (int)s;
        }
         public static int Add(int a, int b)
    {
        return a + b;
    }

    // 计算两个小数相加
    public static double Add(double a, double b)
    {
        return a + b;
    }

    // 计算两个字符串相加
    public static string Add(string a, string b)
    {
        return a + b;
    }

    // 从1到指定整数的和的方法
    public static int Sum(int n)
    {
        int sum = 0;
        for (int i = 1; i <= n; i++)
        {
            sum += i;
        }
        return sum;
    }
    }
}
